<?php !defined('DYHB_PATH') && exit; /* DoYouHaoBaby Framework 模板缓存文件 生成时间：2011-05-29 10:58:33  */ ?>
<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_header.html" ,"" ,"" ,"" )  ;?>

<script type="text/javascript">
<!--
$(document).ready(function() {

	$("#badwords > ul").tabs();
});

//-->
</script>

<script type="text/javascript">
<!--
function add(){

	Dyhb.AjaxSubmit('badwordAdd','<?php echo( G::U('badword/insert') );?>','',complete);
}
function complete(data,status){

    if(status==1){

        window.setTimeout(function (){window.location.href=URL,20000});
    }
}
function many_add(){

	Dyhb.AjaxSubmit('badwordManyAdd','<?php echo( G::U('badword/many_insert') );?>','',complete);
}
-->
</script>

   <!-- 标题  -->
   <div class="title"><?php if(empty( $nId )) :?><?php print G::L( "添加过滤词语", null, null ) ; ?><?php else: ?><?php print G::L( "编辑过滤词语", null, null ) ; ?><?php endif; ?> ( <a href="<?php echo( G::U('badword/index') );?>"><?php print G::L( "返回过滤词语列表", null, null ) ; ?></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
      <div id="badwords">
      <ul>
        <li><a href="#tab_addbadword"><span><?php print G::L( "添加词语过滤", null, null ) ; ?></span></a></li>
        <li><a href="#tab_addmanybadword"><span><?php print G::L( "批量添加", null, null ) ; ?></span></a></li>
      </ul>
    </div>

    <form  method="post" id="badwordAdd" name="badwordAdd">
    <div id="tab_addbadword">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="badword_find"><?php print G::L( "不良词语", null, null ) ; ?>:</label></th>
            <td><input type="text" name="badword_find" id="badword_find" class="field" size="40" value=""/>
            <div class="description"><?php print G::L( "添加不良词语可以避免触及法律", null, null ) ; ?></div></td>
          </tr>
          <tr>
            <th valign="top"><label for="badword_replacement"><?php print G::L( "替换为", null, null ) ; ?>:</label></th>
            <td><input type="text" name="badword_replacement" id="badword_replacement" class="field" size="40"  value=""/>
            <div class="description"><?php print G::L( "需要将不良词语替换的词语", null, null ) ; ?></div>
            </td>
          </tr>
      </table>
       <p class="center"><input type="hidden" name="ajax" value="1">
            <input type="button" onclick="add()"  class="button" value=" <?php print G::L( "添加过滤词语", null, null ) ; ?> " />
            <input type="reset" class="button" value="  <?php print G::L( "重  置", null, null ) ; ?>  " />
        </p>
   </div>
   </form>

   <form  method="post" id="badwordManyAdd" name="badwordManyAdd">
    <div id="tab_addmanybadword">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="badwords"><?php print G::L( "不良词语", null, null ) ; ?>:</label></th>
            <td><textarea name="badwords" id="badwords" rows="6" cols="80" class="field"></textarea>
              <div class="description"><?php print G::L( "每行一组，不良词语和替换词语之间使用“=”进行分割。
					如果想将某个词语直接替换成 **，只输入词语即可。", null, null ) ; ?><br/>
					<strong><?php print G::L( "例如", null, null ) ; ?>：</strong><br/>
					<?php print G::L( "toobad", null, null ) ; ?><br/>
					<?php print G::L( "badword=good", null, null ) ; ?><br/>
             </div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="type"><?php print G::L( "扩展选项", null, null ) ; ?>:</label></th>
            <td><input type="radio" name="type" value="2" id="type" class="field" checked="checked" /><?php print G::L( "当冲突时，跳过原来的词表", null, null ) ; ?><br/>
				<input type="radio" name="type" value="1" id="" class="field" /><?php print G::L( "当冲突时，覆盖原来的词表", null, null ) ; ?><br/>
				<input type="radio" name="type" value="0" id="" class="field" /><?php print G::L( "清空当前词表，后导入新词语", null, null ) ; ?>
				<div class="warning">（<?php print G::L( "清空当前词表不可恢复，建议首先", null, null ) ; ?><a href="<?php echo( G::U('badword/export') );?>" target="_blank"><?php print G::L( "导出词表", null, null ) ; ?></a>，<?php print G::L( "做好备份", null, null ) ; ?>）</div>
</td>
          </tr>
      </table>
       <p class="center"><input type="hidden" name="ajax" value="1">
            <input type="button" onclick="many_add()"  class="button" value=" <?php print G::L( "批量过滤词语", null, null ) ; ?> " />
            <input type="reset" class="button" value="  <?php print G::L( "重  置", null, null ) ; ?>  " />
        </p>
   </div>
   </form>


   </div>
   <!-- end content -->

<?php $this->includeChildTemplate( "".APP_PATH."/Tpl/Default/public_footer.html" ,"" ,"" ,"" )  ;?>